<?php

//TODO: askedByXXX durch user-Objekt ersetzen
class Question
{

	protected $answer = '';
	protected $answeredAt = '';
	protected $askedAt = '';
	protected $askedByName = '';
	protected $askedById = -1;
	protected $id = -1;
	protected $knowledgeDomain = null;
	protected $text = '';
	protected $title = '';
	protected $feedback = 0;
	
	
	public function GetAnswer()
	{
		return $this->answer;
	}

	
	public function GetAnsweredAt()
	{
		return $this->answeredAt;
	}
	

	public function GetAskedAt()
	{
		return $this->askedAt;
	}
	

	public function GetAskedById()
	{
		return $this->askedById; 
	}
	

	public function GetAskedByName()
	{
		return $this->askedByName;
	}
	

	public function GetId()
	{
		return $this->id;
	}
	

	public function GetKnowledgeDomain()
	{
		return $this->knowledgeDomain;
	}
	

	public function GetText()
	{
		return $this->text;
	}
	

	public function GetTitle()
	{
		return $this->title;
	}
	
	
	public function GetFeedback()
	{
		return $this->feedback;
	}
	

	
	public function Question($id, $title, $text, $knowledgeDomain, $askedAt, $askedById, $askedByName, $answer, $answeredAt, $feedback)
	{
		$this->id = $id;
		$this->title = $title;
		$this->text = $text;
		$this->knowledgeDomain = $knowledgeDomain;
		$this->askedAt = $askedAt;
		$this->askedById = $askedById;
		$this->askedByName = $askedByName;
		$this->answer = $answer;
		$this->answeredAt = $answeredAt;
		$this->feedback = $feedback;
	}

	
	
	function __destruct()
	{
	}
	
	
	
	public function HasAnswer()
	{
		if ($this->answer) return TRUE;
		return FALSE;
	}



}
?>